import {
  axios
} from '@/utils/request'
/**
   * 菜单模块api
  */

// 获取角色列表
function getMenuAllData () {
  return axios({
    url: '/user-service/menu/list',
    method: 'get'
  })
}
// 根据菜单ID查询菜单信息
function info (params) {
  return axios({
    url: '/user-service/menu/info',
    method: 'get',
    params
  })
}
// 新增菜单
function addMenu (data) {
  return axios({
    url: '/user-service/menu',
    method: 'post',
    data
  })
}
// 修改菜单
function updateMenu (data) {
  return axios({
    url: '/user-service/menu',
    method: 'put',
    data
  })
}
// 批量删除菜单
function deleteMenu (data) {
  return axios({
    url: '/user-service/menu',
    method: 'delete',
    data
  })
}

export default {
  getMenuAllData,
  info,
  addMenu,
  updateMenu,
  deleteMenu,
}
